
import turtle as t
t.colormode(255)
import random

def star():
    t.clear()
    r = random.randint(0, 255)
    g = random.randint(0, 255)
    b = random.randint(0, 255)
    t.color(r,g,b)
    t.begin_fill()
    for i in range(5):
        t.forward(100)
        t.right(144)
    t.end_fill()
    t.ontimer(star, 1000)

t.tracer(False)

star()
t.done()